import Vue from "vue";
import qs_list from "../components/qs_list.vue";
import VueRouter from "vue-router";
import qs_create from "../components/qs_create.vue";
import qs_fill from "../components/qs_fill.vue";
import thankYou from "../components/ThankYou.vue";
import dataShow from "../components/DataShow.vue";
import Preview from '../components/Preview.vue';
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "qs_list",
    component: qs_list,
  },
  {
    path: "/qs_create",
    name: "qs_create",
    component: qs_create,
  },
  {
    path: "/qs_fill/:id",
    name: "qs_fill",
    component: qs_fill,
  },
  {
    path: "/dataShow",
    name: "dataShow",
    component: dataShow,
  },
  {
    path: "/thankYou",
    name: "thankYou",
    component: thankYou,
  },
  {
    path: "/preview",
    name: "preview",
    component: Preview,
  }
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
